home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow_WinXP / VMR / VMRMix / DlgWait.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-08  |  1.6 KB  |  65 lines

  1. //------------------------------------------------------------------------------
  2. // File: DlgWait.cpp
  3. //
  4. // Desc: DirectShow sample code
  5. //       Progress bar 'wait' dialog
  6. //
  7. // Copyright (c) 2000-2001 Microsoft Corporation.  All rights reserved.
  8. //------------------------------------------------------------------------------
  9.  
  10. #include "stdafx.h"
  11. #include "VMRMix.h"
  12. #include "DlgWait.h"
  13.  
  14. #ifdef _DEBUG
  15. #define new DEBUG_NEW
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19.  
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CDlgWait dialog
  22.  
  23.  
  24. CDlgWait::CDlgWait(int nMax, CWnd* pParent /*=NULL*/)
  25.     : CDialog(CDlgWait::IDD, pParent)
  26. {
  27.     m_Max = nMax;
  28.     //{{AFX_DATA_INIT(CDlgWait)
  29.         // NOTE: the ClassWizard will add member initialization here
  30.     //}}AFX_DATA_INIT
  31. }
  32.  
  33.  
  34. void CDlgWait::DoDataExchange(CDataExchange* pDX)
  35. {
  36.     CDialog::DoDataExchange(pDX);
  37.     //{{AFX_DATA_MAP(CDlgWait)
  38.     DDX_Control(pDX, IDC_PROGRESS, m_Progress);
  39.     //}}AFX_DATA_MAP
  40. }
  41.  
  42.  
  43. BEGIN_MESSAGE_MAP(CDlgWait, CDialog)
  44.     //{{AFX_MSG_MAP(CDlgWait)
  45.     //}}AFX_MSG_MAP
  46. END_MESSAGE_MAP()
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CDlgWait message handlers
  50.  
  51. BOOL CDlgWait::OnInitDialog() 
  52. {
  53.     CDialog::OnInitDialog();
  54.     
  55.     m_Progress.SetRange(0, (WORD) m_Max);
  56.         
  57.     return TRUE;  // return TRUE unless you set the focus to a control
  58.                   // EXCEPTION: OCX Property Pages should return FALSE
  59. }
  60.  
  61. void CDlgWait::SetPos( int n)
  62. {
  63.     m_Progress.SetPos( n);
  64. }
  65.